import request from '@/plugin/axios'

// export function AccountLogin (data) {
//   return request({
//     url: '/login',
//     method: 'post',
//     data
//   })
// }

export function getCaptcha (uuid) {
  return request({
    url: '/upms/captcha.jpg?uuid=' + uuid,
    method: 'get',
  })
}

export function AccountLogin(data) {
    return request({
        url: '/upms/login/token',
        method: 'post',
        data: request.adornData(data, false, 'form'),
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}

export function AccountLogout(data){
    return request({
        url: '/upms/logout/token',
        method: 'get',
        params: request.adornParams({
            token: data
        })
    })
}